package gestionTransportObjetsGenerated;

/**
 * Interface definition : GestionAdherent
 * 
 * @author OpenORB Compiler
 */
public abstract class GestionAdherentPOA extends org.omg.PortableServer.Servant
        implements GestionAdherentOperations, org.omg.CORBA.portable.InvokeHandler
{
    public GestionAdherent _this()
    {
        return GestionAdherentHelper.narrow(_this_object());
    }

    public GestionAdherent _this(org.omg.CORBA.ORB orb)
    {
        return GestionAdherentHelper.narrow(_this_object(orb));
    }

    private static String [] _ids_list =
    {
        "IDL:gestionTransportObjetsGenerated/GestionAdherent:1.0"
    };

    public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte [] objectId)
    {
        return _ids_list;
    }

    public final org.omg.CORBA.portable.OutputStream _invoke(final String opName,
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler)
    {

        if (opName.equals("getAdherent")) {
                return _invoke_getAdherent(_is, handler);
        } else if (opName.equals("identifierUser")) {
                return _invoke_identifierUser(_is, handler);
        } else if (opName.equals("inscrireUser")) {
                return _invoke_inscrireUser(_is, handler);
        } else if (opName.equals("verifierAdhDest")) {
                return _invoke_verifierAdhDest(_is, handler);
        } else {
            throw new org.omg.CORBA.BAD_OPERATION(opName);
        }
    }

    // helper methods
    private org.omg.CORBA.portable.OutputStream _invoke_identifierUser(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        String arg0_in = _is.read_string();

        gestionTransportObjetsGenerated.Adherent _arg_result = identifierUser(arg0_in);

        _output = handler.createReply();
        gestionTransportObjetsGenerated.AdherentHelper.write(_output,_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_getAdherent(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        String arg0_in = _is.read_string();

        gestionTransportObjetsGenerated.Adherent _arg_result = getAdherent(arg0_in);

        _output = handler.createReply();
        gestionTransportObjetsGenerated.AdherentHelper.write(_output,_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_inscrireUser(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        gestionTransportObjetsGenerated.Adherent arg0_in = gestionTransportObjetsGenerated.AdherentHelper.read(_is);

        gestionTransportObjetsGenerated.Adherent _arg_result = inscrireUser(arg0_in);

        _output = handler.createReply();
        gestionTransportObjetsGenerated.AdherentHelper.write(_output,_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_verifierAdhDest(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        String arg0_in = _is.read_string();

        gestionTransportObjetsGenerated.Adherent[] _arg_result = verifierAdhDest(arg0_in);

        _output = handler.createReply();
        gestionTransportObjetsGenerated.DestinatairesHelper.write(_output,_arg_result);

        return _output;
    }

}
